package neurons;

public class Connection implements ConnectionInterface {

	private NeuronInterface inNeuron;
	private NeuronInterface targetNeuron;
	private double weight;

	@Override
	public double getWeight() {
		return weight;
	}

	public Connection(NeuronInterface inNeuron, NeuronInterface targetNeuron,
			double weight) {
		this.inNeuron = inNeuron;
		this.targetNeuron = targetNeuron;
		this.weight = weight;
	}

	@Override
	public void transmit(SignalInterface signal) {
		targetNeuron.propagate(signal);
	}

	@Override
	public NeuronInterface getInNeuron() {
		return inNeuron;
	}
}
